/*
 * @Author: your name
 * @Date: 2022-04-26 09:19:53
 * @LastEditTime: 2022-04-29 15:33:22
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \trace-source-web\src\api\tracing-source-code\tracing-source-code.js
 */
import xjaxios from "@/api/axios";
// let organizationNo = sessionStorage.getItem('organizationNo');

export default {
  /**
  * @description: 信息 *代表必填
  */
  artificialPageList(params) {
    return xjaxios.post("/v3/trace/artificialOrganization/queryPageList", {
      ...params
    });
  },
  artificialOrganization(artificialOrganizationId) {
    return xjaxios.get(`/v3/trace/artificialOrganization/query?artificialOrganizationNo=${artificialOrganizationId}`);
  },
  traceByCondition(params) {
    return xjaxios.post("/v3/trace/artificialOrganization/queryByCondition", {
      ...params
    });
  },
  // 添加
  artificialAdd(params) {
    return xjaxios.post("/v3/trace/artificialOrganization/add", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    });
  },
  // 修改
  artificialEdit(params) {
    return xjaxios.post("/v3/trace/artificialOrganization/edit", {
      ...params
    });
  },
  // 删除
  artificialDelList(params) {
    return xjaxios.post("/v3/trace/artificialOrganization/delList", {
      ...params
    });
  },
  traceExcel(params) {
    return xjaxios.get(`/v3/trace/traceNo/queryExcel1?organizationNo=${sessionStorage.organizationNo}&traceNoIdList=${params}`, { responseType: 'arraybuffer' });
  },
  // 主体图片
  artificialPictureList(params) {
    return xjaxios.post(`/v3/trace/artificialPicture/addPictureList`, params);
  },
  artificialPictureListEdit(params) {
    return xjaxios.post(`/v3/trace/artificialPicture/editPictureList`, params);
  },
  // 查询检测报告
  artificialPictureQuery(artificialOrganizationId) {
    return xjaxios.get(`/v3/trace/artificialPicture/queryByArtificialOrganizationNo?artificialOrganizationNo=${artificialOrganizationId}`);
  },
  // 检测报告
  productionPictureList(params) {
    return xjaxios.post(`/v3/trace/artificialPicture/addProductionPictureList`, params);
  },
  productionPictureListEdit(params) {
    return xjaxios.post(`/v3/trace/artificialPicture/editProductionPictureList`, params);
  },
  artificialProductPictureQuery(artificialProductionBaseInfoNo) {
    return xjaxios.get(`/v3/trace/artificialPicture/queryByProductionNo?artificialProductionBaseInfoNo=${artificialProductionBaseInfoNo}`);
  }
}
